import ajax from "@/utils/request";


// 获取分类接口
export function categoriesFn() {
    return ajax({
        url: '/categories'
    })
}

// 获取特定分类下推荐数据的接口
export function fetchRecommendationsByCategory(categoryId: string) {
    return ajax({
        url: `/recommendations/category/${categoryId}`,
        method: 'GET',
    });
}




// 修改点赞状态
// /recommendations/:id/like
export function recommendationsLikesFn(recommendationId:number) {
    return ajax({
        method: 'put',
        url: `/recommendations/${recommendationId}/like`
    })
}
